package cn.edu.zut.cs.Business;

import cn.edu.zut.cs.DAO.VehicleDAO;
import cn.edu.zut.cs.Model.Vehicle;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@org.springframework.stereotype.Service
public class Service {
    VehicleDAO vehicleDAO;
    @Autowired
    public void setVehicleDAO(VehicleDAO vehicleDAO){
        this.vehicleDAO=vehicleDAO;
    }
    public void insert(Vehicle vehicle){
        vehicleDAO.insertVehicle(vehicle);
    }

    public List<Vehicle> queryAll(){
        return vehicleDAO.queryAll();
    }
}
